package com.yifeng.controller;

import com.yifeng.po.User;
import com.yifeng.service.IUserService;
import com.yifeng.util.LayuiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Decription :
 * author : yifeng
 * 创建时间 ：2019/1/22 :10:18
 * version : 1.0
 */
@Controller
@RequestMapping("/api/user")
public class UserController {

    @Autowired
    private IUserService userService;

    @RequestMapping("/list")
    @ResponseBody
    public LayuiResult<User> getAll(int page, int limit)
    {
        LayuiResult<User> result = userService.getPageAll(page, limit);
        return result;
    }
}
